package md.frolov.bible.sorters;

import md.frolov.bible.model.Book;
import md.frolov.bible.model.Chapter;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;

public class BookSorter extends ViewerSorter {

	@Override
	public int compare(Viewer viewer, Object e1, Object e2) {
		if((e1 instanceof  Book) && (e2 instanceof Book)) return 0;
		if((e1 instanceof  Chapter) && (e2 instanceof Chapter)) return 0;
		return super.compare(viewer, e1, e2);
	}
	
}
